a=input().split()
s=0
wordylak=['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine']
if len (a)!=3 and a[i] in wordylak:
        print("wrong input")
else:
         for i in range(3):
             if a[i] not in wordylak:
                 print("wrong input")
for i in range(10):
                    if a[0]==wordylak[i]:
                        s=i*100
                    if a[1]==wordylak[i]:
                        s+=i*10
                    if a[2]==wordylak[i]:
                        s+=i*1
print(s)

                                
                                
       
